/*
 *    报事报修管理
 * Author: lengleng (wangiegie@gmail.com)
 */

import request from "@/router/axios";

export function fetchList(query) {
  return request({
    url: "/repair/cscustomerservice/page",
    method: "get",
    params: query
  });
}

export function addObj(obj) {
  return request({
    url: "/repair/cscustomerservice",
    method: "post",
    data: obj,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  });
}

export function getObj(id) {
  return request({
    url: "/repair/cscustomerservice/" + id,
    method: "get"
  });
}

export function delObj(id) {
  return request({
    url: "/repair/cscustomerservice/" + id,
    method: "delete"
  });
}

export function putObj(obj) {
  return request({
    url: "/repair/cscustomerservice",
    method: "put",
    data: obj,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  });
}
// 通过房产编号拿公司信息
export function getIdCompany(id) {
  return request({
    url: "/estate/rmproject/company/" + id,
    method: "get"
  });
}
